package com.search.listener;

import com.search.service.impl.EsServiceImpl;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class GoodsDelListener {
    @Autowired
    private EsServiceImpl esService;
    @RabbitListener(queues = "search_del_queue")
    public void message(String spuid) {
      System.out.println(spuid);
      esService.delete(spuid);
    }
}
